package com.orhon.smartcampus.utils;


public class Util {

	
	public static String decide(Object obj){
		try {
			int i = Integer.parseInt(obj.toString());
			return " = "+ i;
		} catch (Exception e) {
			String[] split = obj.toString().split("_");
			String string = split[0];
			if(string.equals("like")) {
				return " like '%"+split[1]+"%'";//模糊查询
			}else if(string.equals("null")){
				return " = null";
			}else {
				return " = '" + obj.toString() +"'";
			}
		}
    }
}
